package com.oasis.cloud.controller;

import org.apache.commons.lang.math.RandomUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

@RestController
public class UserController {


    /**
     * 获取用户信息
     */
    @RequestMapping("/getUserMessage")
    public String getUserMessage() {
        return "请求成功";
    }


    /**
     * 获取验证码
     */
    @RequestMapping("/getCode")
    public String getCode() {
        return "验证码已发送成功：" +  RandomUtils.nextInt(4);
    }
}
